package Book;

public class BookList {
    private Book[] books = new Book[10]; //创建书架
    private int listsize;//书架容量
    //初始化
    public BookList(){
        this.books[0] = new Book("三国演义","罗贯中",2000,"小说");
        this.books[1] = new Book("西游记","吴承恩",2023,"小说");
        this.books[2] = new Book("钢铁是怎么炼成的","尼古拉*奥斯特洛夫斯基",20234,"外国小说");
        this.listsize = 3;
    }
    //获得书架上的一本书
    public Book get_book(int pos){
        return books[pos];
    }
    //放一本书到书架上
    public void set_book(Book book,int pos){
        books[pos] = book;
    }

    public int getListsize() {
        return listsize;
    }

    public void setListsize(int listsize) {
        this.listsize = listsize;
    }
}
